package com.token.model.dto;

import com.token.service.Consumer;

/**
 * @auther: henriy
 * @Date: 2023/12/29
 */
public class ConsumerTest {

    private final Consumer<String> consumer;

    public ConsumerTest(Consumer<String> consumer){
        this.consumer = consumer;
    }

    public void execute() {
        consumer.accept("Hello, Function Interface!");
    }

    public static void main(String[] args) {
        ConsumerTest example = new ConsumerTest(System.out::println);
        example.execute();
    }

}
